﻿@using MealBooking.Core.Models.Orders;
@model List<Order>
@{
    var orders = Model;
    ViewBag.HeaderTitle = "History Orders";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
<ul data-role="listview" data-inset="true" data-mini="true">
    <li data-role="list-divider"></li>
    @if (orders == null || orders.Count == 0)
    {
        <li>No Orders Yet.</li>
    }
    else
    {
        foreach (var order in orders)
        {
        <li><a title="view detail..." href="@Url.Action("OrderDetail", new { orderId = order.Id })">
            <p>
                <strong>@order.ToString()</strong>
                <br />
                [Total Price: @order.TotalPrice]
            </p>
        </a></li>
        }
    }
</ul>
<ul data-role="listview" data-inset="true" data-mini="true">
    <li data-role="list-divider"></li>
    <li><a href="@Url.Action("TodayOrder", "Order")">View Today's Order</a> </li>
    <li><a href="@Url.Action("CustomersTodayOrders", "Order")">View Others' Orders</a></li>
</ul>
